package com.framework.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.framework.entity.sys.SysAgentGrade;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 功能描述: 代理商等级
 *
 * @author ck
 * @date 2018/9/13 13:25
 */
public interface AgentGradeDao extends BaseMapper<SysAgentGrade> {

    /**
     *根据查询合伙人等级
     * @param agentId
     * @return
     */
    SysAgentGrade checkByAgentId(@Param("agentId")Long agentId );

    /**
     *修改合伙人等级表信息
     * @param sysAgentGrade
     */
    void updateGradeById(@Param("ex") SysAgentGrade sysAgentGrade);

    /**
     *  获取合伙人分润相关明细
     * @param agentId
     * @param deptId
     * @return
     */
    List<Map<String, Object>> getRateList(@Param("agentId") Long agentId, @Param("deptId") Long deptId);
}
